package com.zks.util.returnData;

/**
 * 封装返回类型
 * @param <T>
 */
public class OpenResponse<T> {
    private int code;
    private String message;
    private T data;
    private String messageId;

    public OpenResponse() {
        this.code = OpenResponseCode.SUCCESS.getCode();
        this.message = OpenResponseCode.SUCCESS.getDescription();
    }

    public OpenResponse(OpenResponseCode responseCode) {
        this.code = responseCode.getCode();
        this.message = responseCode.getDescription();
    }

    public int getCode() {
        return this.code;
    }

    public String getMessage() {
        return this.message;
    }

    public T getData() {
        return this.data;
    }

    public String getMessageId() {
        return this.messageId;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public void setData(T data) {
        this.data = data;
    }

    public void setMessageId(String messageId) {
        this.messageId = messageId;
    }
}
